package test2;

public class Phone {
    //创建对象
    private String brand;
    private String color;
    private int price;
    private String model;
    //构造
    //空参构造
    public Phone(){

    }
    //实参构造
    public Phone(String brand,String color,int price,String model){
        this.brand=brand;
        this.color=color;
        this.price=price;
        this.model=model;
    }
    //set,get方法

    public void setBrand(String brand) {
        this.brand = brand;
    }
    public String getBrand(){
        return brand;
    }
    public void setColor(String color){
        this.color=color;
    }
    public String getColor(){
        return color;
    }
    public void setPrice(int price){
        this.price=price;
    }
    public int getPrice(){
        return price;
    }
    public void setModel(String model){
        this.model=model;
    }
    public String getModel(){
        return model;
    }
}
